package com.zhongfl.crm.lixiao.mapper;

import com.zhongfl.crm.model.boss.OrderConfirm;
import com.zhongfl.crm.model.boss.QueryTaskType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mawenlei
 */
public interface OrderConfirmMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(OrderConfirm record);

    List<OrderConfirm> selectByOrderNoAndType(@Param("orderNo") String orderNo, @Param("confirmType") String confirmType);

    int update(OrderConfirm record);

    void updateOrderConfirmStatus(OrderConfirm orderConfirm);

    void deleteByOrderNo(OrderConfirm orderConfirm);

    OrderConfirm selectById(Integer id);

    /**
     * 查询审批任务
     *
     * @param queryTaskType
     * @return
     */
    List<OrderConfirm> selectApprovalList(QueryTaskType queryTaskType);

    /**
     * 审批任务的详情
     *
     * @param queryTaskType
     * @return
     */
    OrderConfirm selectApprovalDetail(QueryTaskType queryTaskType);

    /**
     * 待审批的数量
     * @param queryTaskType
     * @return
     */
    Integer myApproveStatistics(QueryTaskType queryTaskType);

    /**
     * 查询所有的审批
     * @return
     */
    List<OrderConfirm> selectList();
}